package com.jia.controller;

import com.jia.pojo.Authority;
import com.jia.service.AuthorityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

/**
 * @author 贾宇光
 * @version 1.0
 * @date 2020/9/17 9:42
 */
@Controller
@RequestMapping("/authority")
public class AuthorityController {
    @Autowired
    AuthorityService authorityService;

    @GetMapping("/select")
    public String index(Model model){
        List<Authority> authorityList = authorityService.list(null);
        model.addAttribute("authorityList",authorityList);
        return "pages/authority/selectAuthority";
    }
}
